<%@ page contentType="text/html;charset=utf-8" language="java" pageEncoding="utf-8" %>
<%@ taglib uri="http://www.kantega.no/aksess/tags/aksess" prefix="aksess" %>
<%@ taglib uri="http://www.kantega.no/aksess/tags/commons" prefix="kantega" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

<kantega:section id="title">
    <aksess:getattribute name="title"/>
</kantega:section>

<kantega:section id="bodyclass">frontPage</kantega:section>

<kantega:section id="content">
    <div>
        <h1>Opprett gruppe</h1>
        <form:form modelAttribute="group" action="${pageContext.request.contextPath}/koren/creategroup" cssClass="form">
            <div class="form-group row <c:if test="${not empty nameErrors}">has-error</c:if>">
                <div class="col-sm-4 col-xs-12 required">
                    <form:label path="name" for="Name" cssClass="control-label">Navn:</form:label>:
                </div>

                <div class="col-sm-8 col-xs-11">
                    <c:if test="${not empty nameErrors}">
                        <div class="alert alert-danger" >
                            <form:errors path="name" for="Name"/>
                        </div>
                    </c:if>
                    <form:input id="Name" path="name" type="text" cssClass="form-control required" placeholder="Navn"></form:input>

                </div>

            </div>

            <div class="form-group row <c:if test="${not empty descriptionErrors}">has-error</c:if>">
                <div class="col-sm-4 col-xs-12 required">
                    <form:label path="description" for="Description" cssClass="control-label">Description:</form:label>:
                </div>

                <div class="col-sm-8 col-xs-11">
                    <c:if test="${not empty descriptionErrors}">
                        <div class="alert alert-danger" >
                            <form:errors path="description" for="Description"/>
                        </div>
                    </c:if>
                    <form:input id="Description" path="description" type="text" cssClass="form-control required" placeholder="Navn"></form:input>

                </div>

            </div>


            <form:hidden path="id"/>
            <input type="submit" value="Opprett gruppe" class="btn btn-default"/>
        </form:form>
    </div>
</kantega:section>

<aksess:include url="/WEB-INF/jsp$SITE/include/design/frontpage.jsp"/>

